package com.jf.cloud.user.service.impl;

import com.jf.cloud.common.database.dto.PageDTO;
import com.jf.cloud.common.database.util.PageUtil;
import com.jf.cloud.common.database.vo.PageVO;
import com.jf.cloud.user.model.UserTravelsCommentLog;
import com.jf.cloud.user.mapper.UserTravelsCommentLogMapper;
import com.jf.cloud.user.service.UserTravelsCommentLogService;
import org.springframework.stereotype.Service;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * 
 *
 * @author zz
 * @date 2023-12-01 15:16:03
 */
@Service
public class UserTravelsCommentLogServiceImpl implements UserTravelsCommentLogService {

    @Autowired
    private UserTravelsCommentLogMapper userTravelsCommentLogMapper;

    @Override
    public PageVO<UserTravelsCommentLog> page(PageDTO pageDTO,Long comId) {
        return PageUtil.doPage(pageDTO, () -> userTravelsCommentLogMapper.list(comId));
    }

    @Override
    public UserTravelsCommentLog getById(Long id) {
        return userTravelsCommentLogMapper.getById(id);
    }

    @Override
    public int count(Long comId) {
        return userTravelsCommentLogMapper.count(comId);
    }

    @Override
    public void save(UserTravelsCommentLog userTravelsCommentLog) {
        userTravelsCommentLogMapper.save(userTravelsCommentLog);
    }

    @Override
    public void update(UserTravelsCommentLog userTravelsCommentLog) {
        userTravelsCommentLogMapper.update(userTravelsCommentLog);
    }

    @Override
    public void deleteById(Long id) {
        userTravelsCommentLogMapper.deleteById(id);
    }
}
